package T01_创建项目;

import ag.script.project.standard.core.ScreensDes;
import ag.script.project.standard.core.ScriptProject;
import ag.script.project.standard.core.ScriptProjectImgsTranslator;
import cn.hutool.core.io.FileUtil;

public class Main {
    public static void main(String[] args) {
        //创建项目
        String projectPath = "D:\\MyWorkspace\\Java\\ag-app-res\\ag-apps\\创造与魔法";
        String iconPath = "D:\\MyWorkspace\\Java\\ag-app-res\\ag-apps\\ag_app_res_icon.png";
        String desc = FileUtil.readUtf8String("D:\\MyWorkspace\\Java\\ag-app-res\\ag-apps\\ag_app_res_description.txt");

        //开始创建项目(如果不存在则创建，存在就不创建)
        ScriptProject scriptProject = new ScriptProject(projectPath, iconPath, desc);
        scriptProject.create(null);

//        List<String> start = PathScanner.start(scriptProject.getProjectPath());
//        for (String s : start) {
//            System.out.println(s);
//        }

        ScreensDes screensDes = new ScreensDes();
        screensDes.setName("1080x");



        //把项目中的图片转移到资源包中，并且替换代码中原本图片
        ScriptProjectImgsTranslator scriptProjectImgsTranslator = new ScriptProjectImgsTranslator(projectPath, screensDes);
        scriptProjectImgsTranslator.start();

    }
}
